import javax.swing.*;
public class My5
{
    public static void main(String[] args)
    {
        System.out.println("It is program My5");
        int i1;
        do
        {
        String ss=JOptionPane.showInputDialog("Your salary?");
        System.out.println("Your salary="+ss);
        i1=Integer.parseInt(ss);
        double xx=0;
        if (i1>5000)
            {
            xx=(i1-5000)*0.30+(5000-1000)*0.14;
            System.out.println("Your must pay:"+xx);
            } else if (i1>1000)
            {
            xx=(i1-1000)*0.14;
            System.out.println("Your must pay:"+xx);
            } else
            System.out.println("Your must not pay nothing!!!");
        } while (i1>0);
        System.exit(0);
    }


}